home *** CD-ROM | disk | FTP | other *** search
-
- /*
- Note from Bob: Milt has agreed to put this small version of
- "ROCKMET" in the public domain. If you're seriously interested
- in prospecting, contact him at the below address for the
- enhanced version.
- */
-
- /* THIS ROCK EXPERT SYSTEM IS BUILT BY MILT POPOVICH II AND IS
- A SAMPLE COPY OF THE LARGE VERSION WHICH CAN BE PURCHASED FROM
- ME AT MY ADDRESS MILT POPOVICH II
- 1355 DEWEY BLVD
- BUTTE, MONTANA 59701
- TELEPHONE (406)-494-7834
- THE PURCHASE PRICE WILL BE NOMINAL FOR HOW USEFUL THE PROGRAM IS TO
- ROCK HOUNDS OR PROSPECTORS */
- luster(molybdenite,metallic).
- color(molybdenite,gray).
- hardness(molybdenite,1-2).
- streak(molybdenite,green).
- fracture(molybdenite,sheets).
- specific_gravity(molybdenite,4-5).
- crystals(molybdenite,hexagonal).
- cleavage(molybdenite,1-perfect).
- test_elements(molybdenite,'MoS2').
- luster(graphite,metallic).
- color(graphite,gray).
- color(graphite,black).
- hardness(graphite,1-2).
- streak(graphite,black).
- fracture(graphite,sheets).
- specific_gravity(graphite,1-2).
- crystals(graphite,hexagonal).
- cleavage(graphite,1-perfect).
- test_elements(graphite,'C').
- luster(sylvanite,metallic).
- color(sylvanite,silver-white).
- color(sylvanite,gray).
- hardness(sylvanite,1-2).
- streak(sylvanite,black).
- fracture(sylvanite,brittle).
- specific_gravity(sylvanite,7-8).
- crystals(sylvanite,monoclinic).
- cleavage(sylvanite,1-perfect).
- test_elements(sylvanite,'AuAgTe4').
- luster(bismuthinite,metallic).
- color(bismuthinite,gray).
- color(bismuthinite,white).
- hardness(bismuthinite,1-2).
- streak(bismuthinite,green).
- fracture(bismuthinite,brittle).
- specific_gravity(bismuthinite,6-7).
- crystals(bismuthinite,orthorhombic).
- cleavage(bismuthinite,1-perfect).
- test_elements(bismuthinite,'Bi2S3').
- luster(stibnite,metallic).
- color(stibnite,gray).
- hardness(stibnite,1-2).
- streak(stibnite,gray).
- fracture(stibnite,brittle).
- specific_gravity(stibnite,4-5).
- crystals(stibnite,orthorhombic).
- cleavage(stibnite,1-perfect).
- test_elements(stibnite,'Sb2S3').
- luster(stephanite,metallic).
- color(stephanite,gray).
- color(stephanite,black).
- hardness(stephanite,2-3).
- streak(stephanite,black).
- fracture(stephanite,brittle).
- specific_gravity(stephanite,4-5).
- crystals(stephanite,orthorhombic).
- cleavage(stephanite,2-good).
- test_elements(stephanite,'Ag5SbS4').
- luster(argentite,metallic).
- color(argentite,gray).
- color(argentite,black).
- hardness(argentite,2-3).
- streak(argentite,black).
- fracture(argentite,hackly).
- specific_gravity(argentite,7-8).
- crystals(argentite,isometric).
- cleavage(argentite,none).
- test_elements(argentite,'Ag2S').
- luster(galena,metallic).
- color(galena,gray).
- hardness(galena,2-3).
- streak(galena,gray).
- fracture(galena,brittle).
- specific_gravity(galena,7-8).
- crystals(galena,isometric).
- cleavage(galena,2-perfect).
- test_elements(galena,'PbS').
- luster(jamesonite,metallic).
- color(jamesonite,gray).
- hardness(jamesonite,2-3).
- streak(jamesonite,black).
- fracture(jamesonite,brittle).
- specific_gravity(jamesonite,5-6).
- crystals(jamesonite,monoclinic).
- cleavage(jamesonite,1-good).
- test_elements(jamesonite,'Pb4FeSb6S14').
- luster(bournonite,metallic).
- color(bournonite,gray).
- color(bournonite,black).
- hardness(bournonite,2-3).
- streak(bournonite,gray).
- streak(bournonite,black).
- fracture(bournonite,brittle).
- specific_gravity(bournonite,5-6).
- crystals(bournonite,orthorhombic).
- cleavage(bournonite,1-good).
- test_elements(bournonite,'PbCuSbS3').
- luster(boulangerite,metallic).
- color(boulangerite,gray).
- hardness(boulangerite,2-3).
- streak(boulangerite,brown).
- streak(boulangerite,gray).
- fracture(boulangerite,brittle).
- specific_gravity(boulangerite,6-7).
- crystals(boulangerite,monoclinic).
- cleavage(boulangerite,1-good).
- test_elements(boulangerite,'Pb5Sb4S11').
- luster(chalcocite,metallic).
- color(chalcocite,gray).
- hardness(chalcocite,2-3).
- streak(chalcocite,gray).
- streak(chalcocite,black).
- fracture(chalcocite,brittle).
- specific_gravity(chalcocite,5-6).
- crystals(chalcocite,orthorhombic).
- cleavage(chalcocite,1-poor).
- test_element(chalcocite,'Cu2S').
- luster(calaverite,metallic).
- color(calaverite,yellow).
- color(calaverite,white).
- hardness(calaverite,2-3).
- streak(calaverite,gray).
- fracture(calaverite,brittle).
- specific_gravity(calaverite,9-10).
- crystals(calaverite,monoclinic).
- cleavage(calaverite,none).
- test_elements(calaverite,'AuTe2').
- luster(copper,metallic).
- color(copper,red).
- hardness(copper,2-3).
- streak(copper,red).
- fracture(copper,hackly).
- specific_gravity(copper,8-9).
- crystals(copper,isometric).
- cleavage(copper,none).
- test_elements(copper,'Cu').
- luster(gold,metallic).
- color(gold,yellow).
- hardness(gold,2-3).
- streak(gold,yellow).
- fracture(gold,malleable).
- specific_gravity(gold,15-19).
- crystals(gold,isometric).
- cleavage(gold,none).
- test_elements(gold,'Au').
- luster(silver,metallic).
- color(silver,tin-white).
- hardness(silver,2-3).
- streak(silver,silver).
- streak(silver,gray).
- fracture(silver,malleable).
- specific_gravity(silver,10-11).
- crystals(silver,isometric).
- cleavage(silver,none).
- test_elements(silver,'Ag').
- luster(enargite,metallic).
- color(enargite,black).
- hardness(enargite,2-4).
- streak(enargite,black).
- fracture(enargite,brittle).
- specific_gravity(enargite,4-5).
- crystals(enargite,orthorhombic).
- cleavage(enargite,1-perfect).
- test_elements(enargite,'Cu3AsS4').
- luster(bornite,metallic).
- color(bornite,red).
- color(bornite,blue).
- hardness(bornite,2-4).
- streak(bornite,black).
- fracture(bornite,brittle).
- specific_gravity(bornite,4-5).
- crystals(bornite,isometric).
- cleavage(bornite,none).
- test_elements(bornite,'Cu5FeS4').
- luster(millerite,metallic).
- color(millerite,yellow).
- hardness(millerite,3-4).
- streak(millerite,black).
- fracture(millerite,brittle).
- specific_gravity(millerite,5-6).
- crystals(millerite,hexagonal).
- test_elements(millerite,'NiS').
- luster(antimony,metallic).
- color(antimony,tin-white).
- color(antimony,gray).
- hardness(antimony,3-4).
- streak(antimony,white).
- streak(antimony,gray).
- fracture(antimony,brittle).
- specific_gravity(antimony,6-7).
- crystals(antimony,hexagonal).
- cleavage(antimony,1-perfect).
- test_elements(antimony,'Sb').
- luster(tetrahedrite,metallic).
- color(tetrahedrite,gray).
- color(tetrahedrite,black).
- hardness(tetrahedrite,3-4).
- streak(tetrahedrite,gray).
- fracture(tetrahedrite,brittle).
- specific_gravity(tetrahedrite,4-5).
- crystals(tetrahedrite,isometric).
- cleavage(tetrahedrite,none).
- test_elements(tetrahedrite,'Cu12Sb4S13').
- luster(arsenic,metallic).
- color(arsenic,tin-white).
- hardness(arsenic,3-4).
- streak(arsenic,white).
- fracture(arsenic,brittle).
- specific_gravity(arsenic,5-6).
- crystals(arsenic,hexagonal).
- cleavage(arsenic,1-perfect).
- test_elements(arsenic,'As').
- luster(chalcopyrite,metallic).
- color(chalcopyrite,yellow).
- hardness(chalcopyrite,3-4).
- streak(chalcopyrite,black).
- fracture(chalcopyrite,brittle).
- specific_gravity(chalcopyrite,4-5).
- crystals(chalcopyrite,tetragonal).
- cleavage(chalcopyrite,1-poor).
- test_elements(chalcopyrite,'CuFeS2').
- luster(pentlandite,metallic).
- color(pentlandite,yellow).
- hardness(pentlandite,3-4).
- streak(pentlandite,brown).
- fracture(pentlandite,brittle).
- specific_gravity(pentlandite,4-3).
- crystals(pentlandite,isometric).
- cleavage(pentlandite,none).
- test_elements(pentlandite,'FeNi_9S8').
- luster(pyrrhotite,metallic).
- color(pyrrhotite,bronze).
- hardness(pyrrhotite,3-5).
- streak(pyrrhotite,black).
- fracture(pyrrhotite,brittle).
- specific_gravity(pyrrhotite,4-5).
- crystals(pyrrhotite,orthorhombic).
- cleavage(pyrrhotite,none).
- test_elements(pyrrhotite,'Fe1-xS').
- luster(platinum,metallic).
- color(platinum,tin-white).
- hardness(platinum,4-5).
- streak(platinum,gray).
- fracture(platinum,malleable).
- specific_gravity(platinum,14-19).
- crystals(platinum,isometric).
- cleavage(platinum,none).
- test_elements(platinum,'Pt').
- luster(limonite,metallic).
- color(limonite,yellow).
- hardness(limonite,4-6).
- streak(limonite,brown).
- fracture(limonite,earthy).
- specific_gravity(limonite,2-4).
- crystals(limonite,amorphous).
- cleavage(limonite,none).
- test_elements(limonite,'FeO_OHnH2O').
- luster(goethite,metallic).
- color(goethite,yellow).
- hardness(goethite,5-6).
- streak(goethite,yellow).
- fracture(goethite,splintery).
- specific_gravity(goethite,3-4).
- crystals(goethite,orthorhombic).
- cleavage(goethite,1-perfect).
- test_elements(goethite,'HFeO2').
- luster(nickeline,metallic).
- color(nickeline,red).
- hardness(nickeline,5-6).
- streak(nickeline,black).
- fracture(nickeline,uneven).
- specific_gravity(nickeline,7-8).
- crystals(nickeline,hexagonal).
- cleavage(nickeline,none).
- test_elements(nickeline,'NiAS').
- luster(hematite,metallic).
- color(hematite,gray).
- color(hematite,brown).
- color(hematite,black).
- color(hematite,red).
- hardness(hematite,5-6).
- streak(hematite,red).
- fracture(hematite,brittle).
- specific_gravity(hematite,4-5).
- crystals(hematite,hexagonal).
- cleavage(hematite,none).
- test_elements(hematite,'Fe2O3').
- luster(ilmenite,metallic).
- color(ilmenite,black).
- hardness(ilmenite,5-6).
- streak(ilmenite,black).
- fracture(ilmenite,brittle).
- specific_gravity(ilmenite,4-5).
- crystals(ilmenite,hexagonal).
- cleavage(ilmenite,none).
- test_elements(ilmenite,'FeTiO3').
- luster(cobaltite,metallic).
- color(cobaltite,silver-white).
- color(cobaltite,gray).
- hardness(cobaltite,5-6).
- streak(cobaltite,black).
- fracture(cobaltite,brittle).
- specific_gravity(cobaltite,5-6).
- crystals(cobaltite,isometic).
- cleavage(cobaltite,1-perfect).
- test_elements(cobaltite,'CoFe_AsS').
- luster(chromite,metallic).
- color(chromite,black).
- hardness(chromite,5-6).
- streak(chromite,brown).
- fracture(chromite,brittle).
- specific_gravity(chromite,4-5).
- crystals(chromite,isometric).
- cleavage(chromite,none).
- test_elements(chromite,'FeCr2O4').
- luster(skutterudite,metallic).
- color(skutterudite,tin-white).
- color(skutterudite,gray).
- hardness(skutterudite,5-6).
- streak(skutterudite,gray).
- fracture(skutterudite,brittle).
- specific_gravity(skutterudite,6-7).
- crystals(skutterudite,isometric).
- cleavage(skutterudite,2-good).
- test_elements(skutterudite,'CoNi_As3').
- luster(arsenopyrite,metallic).
- color(arsenopyrite,gray).
- hardness(arsenopyrite,5-6).
- streak(arsenopyrite,black).
- fracture(arsenopyrite,brittle).
- specific_gravity(arsenopyrite,6-7).
- crystals(arsenopyrite,monoclinic).
- cleavage(arsenopyrite,1-good).
- test_elements(arsenopyrite,'FeAsS').
- luster(franklinite,metallic).
- color(franklinite,black).
- hardness(franklinite,5-7).
- streak(franklinite,black).
- fracture(franklinite,brittle).
- specfic_gravity(franklinite,5-6).
- crystals(franklinite,isometric).
- cleavage(franklinite,none).
- test_elements(franklinite,'ZnMnFe_FeMn_2O4').
- luster(magnetite,metallic).
- color(magnetite,black).
- hardness(magnetite,5-7).
- streak(magnetite,black).
- fracture(magnetite,brittle).
- specific_gravity(magnetite,4-5).
- crystals(magnetite,isometric).
- cleavage(magnetite,none).
- test_elements(magnetite,'Fe3O4').
- luster(pyrolusite,metallic).
- color(pyrolusite,black).
- color(pyrolusite,gray).
- hardness(pyrolusite,6-7).
- streak(pyrolusite,black).
- fracture(pyrolusite,brittle).
- specific_gravity(pyrolusite,4-5).
- crystals(pyrolusite,tetragonal).
- cleavage(pyrolusite,1-perfect).
- test_elements(pyrolusite,'MnO2').
- luster(rutile,metallic).
- color(rutile,red).
- color(rutile,brown).
- color(rutile,black).
- hardness(rutile,6-7).
- streak(rutile,white).
- fracture(rutile,brittle).
- specific_gravity(rutile,4-5).
- crystals(rutile,tetragonal).
- cleavage(rutile,2-good).
- test_elements(rutile,'TiO2').
- luster(marcasite,metallic).
- color(marcasite,yellow).
- hardness(marcasite,6-7).
- streak(marcasite,brown).
- fracture(marcasite,brittle).
- specific_gravity(marcasite,4-5).
- crystals(marcasite,orthorhombic).
- cleavage(marcasite,2-good).
- test_elements(marcasite,'FeS2').
- luster(bixbyite,metallic).
- color(bixbyite,black).
- hardness(bixbyite,6-7).
- streak(bixbyite,black).
- fracture(bixbyite,brittle).
- specific_gravity(bixbyite,4-5).
- crystals(bixbyite,isometric).
- cleavage(bixbyite,1-poor).
- test_elements(bixbyite,'MnFe_2O3').
- luster(pyrite,metallic).
- color(pyrite,yellow).
- hardness(pyrite,6-7).
- streak(pyrite,black).
- fracture(pyrite,brittle).
- specific_gravity(pyrite,4-5).
- crystals(pyrite,isometric).
- cleavage(pyrite,none).
- test_elements(pyrite,'FeS2').
- /* end of facts marker */
- luster(end,' ').
- color(end,' ').
- hardness(end,' ').
- streak(end,' ').
- fracture(end,' ').
- specific_gravity(end,' ').
- crystals(end,' ').
- cleavage(end,' ').
- test_elements(T,' ').
- /* graphics rules */
- clearline:- Buffer= ' ',
- print(' ',Buffer).
- sleep(N,1):-N =<1.
- sleep(N,R):- not(N=<1),N1 is N-1,sleep(N1,R1),R is N+R1.
-
- ll:-drawchar(42,3).
- sp:-drawchar(95,4).
- pp:-drawchar(124,2).
- cc(Row,Column,Page):-curset(Row,Column,Page).
-
- top(X1,J1,Stop1):- C is J1 + 1,C =< Stop1,cc(X1,C,0),sp,
- top(X1,C,Stop1).
- leftside(X2,J2,Stop2):-
- R is X2 + 1,R =<Stop2,cc(R,J2,0),pp,leftside(R,J2,Stop2).
- bottom(X3,J3,Stop3):- C is J3 + 1,C =< Stop3,cc(X3,C,0),sp,
- bottom(X3,C,Stop3).
- rightside(X4,J4,Stop4):-
- R is X4 + 1,R =<Stop4,cc(R,J4,0),pp,rightside(R,J4,Stop4).
-
- box(X1,Y1,Stop1,X2,Y2,Stop2,X3,Y3,Stop3,X4,Y4,Stop4):-
- not(top(X1,Y1,Stop1)),
- not(leftside(X2,Y2,Stop2)),not(bottom(X3,Y3,Stop3)),
- not(rightside(X4,Y4,Stop4)).
- r:-
- cls,cc(1,22,0),ll,cc(2,22,0),
- ll,cc(3,22,0),ll,cc(4,22,0),
- ll,cc(5,22,0),ll,cc(6,22,0),
- ll,cc(7,22,0),ll,cc(8,22,0),
- ll,cc(1,23,0),ll,cc(1,24,0),
- ll,cc(1,25,0),ll,cc(1,26,0),
- ll,cc(2,26,0),ll,cc(3,26,0),
- ll,cc(4,26,0),ll,cc(4,23,0),
- ll,cc(4,23,0),ll,cc(4,24,0),
- ll,cc(4,25,0),ll,cc(4,26,0),
- ll,cc(5,24,0),ll,cc(6,25,0),
- ll,cc(7,26,0),ll,cc(8,26,0),
- ll.
- o:- cc(3,29,0),ll,cc(3,30,0),
- ll,cc(3,31,0),ll,cc(3,32,0),
- ll,cc(3,33,0),ll,cc(3,34,0),
- ll,cc(4,29,0),ll,cc(5,29,0),
- ll,cc(6,29,0),ll,cc(7,29,0),
- ll,cc(8,29,0),ll,cc(8,30,0),
- ll,cc(8,31,0),ll,cc(8,32,0),
- ll,cc(8,33,0),ll,cc(8,34,0),
- ll,cc(4,34,0),ll,cc(5,34,0),
- ll,cc(6,34,0),ll,cc(7,34,0),
- ll.
- c:- cc(3,37,0),ll,cc(3,38,0),
- ll,cc(3,39,0),ll,cc(3,40,0),
- ll,cc(3,41,0),ll,cc(4,37,0),
- ll,cc(4,41,0),ll,cc(5,37,0),
- ll,cc(6,37,0),ll,cc(7,37,0),
- ll,cc(7,41,0),ll,
- cc(8,37,0),ll,cc(8,38,0),
- ll,cc(8,39,0),ll,cc(8,40,0),
- ll,cc(8,41,0),ll.
- k:-cc(1,44,0),ll,cc(1,48,0),
- ll,cc(2,44,0),ll,
- cc(2,47,0),ll,cc(3,44,0),
- ll,cc(3,46,0),ll,
- cc(4,44,0),ll,cc(4,45,0),
- ll,
- cc(5,44,0),ll,cc(5,46,0),
- ll,cc(6,44,0),ll,
- cc(6,46,0),ll,cc(7,44,0),
- ll,cc(7,47,0),ll,
- cc(8,44,0),ll,cc(8,48,0),ll.
- e:-
- cc(12,22,0),ll,cc(12,23,0),
- ll,cc(12,24,0),ll,cc(12,25,0),
- ll,cc(12,26,0),ll,cc(13,22,0),
- ll,cc(14,22,0),ll,cc(15,22,0),
- ll,cc(15,23,0),ll,cc(15,24,0),
- ll,cc(15,25,0),ll,cc(15,26,0),
- ll,cc(16,22,0),ll,cc(17,22,0),
- ll,cc(18,22,0),ll,cc(19,22,0),
- ll,cc(19,23,0),ll,cc(19,24,0),
- ll,cc(19,25,0),ll,cc(19,26,0),ll.
- x:-
- cc(12,29,0),ll,cc(13,30,0),
- ll,cc(14,31,0),ll,cc(15,31,0),
- ll,cc(16,31,0),ll,cc(17,30,0),
- ll,cc(18,30,0),ll,cc(19,29,0),
- ll,cc(12,34,0),ll,cc(13,33,0),
- ll,cc(14,32,0),ll,cc(15,32,0),
- ll,cc(16,32,0),ll,cc(17,33,0),
- ll,cc(18,33,0),ll,cc(19,34,0),
- ll.
- p:-
- cc(12,37,0),ll,cc(12,38,0),
- ll,cc(12,39,0),ll,cc(12,40,0),
- ll,cc(12,41,0),ll,cc(13,37,0),
- ll,cc(13,41,0),ll,cc(14,37,0),ll,cc(14,41,0),ll,cc(15,37,0),
- ll,cc(15,38,0),ll,cc(15,39,0),
- ll,cc(15,40,0),ll,cc(15,41,0),
- ll,cc(16,37,0),ll,cc(17,37,0),
- ll,cc(18,37,0),ll,cc(19,37,0),ll.
- e1:-
- cc(12,44,0),ll,cc(12,45,0),
- ll,cc(12,46,0),ll,cc(12,47,0),
- ll,cc(12,48,0),ll,cc(13,44,0),
- ll,cc(14,44,0),ll,cc(15,44,0),
- ll,cc(15,45,0),ll,cc(15,46,0),
- ll,cc(15,47,0),ll,cc(15,48,0),
- ll,cc(16,44,0),ll,cc(17,44,0),
- ll,cc(18,44,0),ll,cc(19,44,0),
- ll,cc(19,45,0),ll,cc(19,46,0),
- ll,cc(19,47,0),ll,cc(19,48,0),ll.
- r1:-
- cc(12,51,0),ll,cc(13,51,0),
- ll,cc(14,51,0),ll,cc(15,51,0),
- ll,cc(16,51,0),ll,cc(17,51,0),
- ll,cc(18,51,0),ll,cc(19,51,0),
- ll,cc(12,52,0),ll,cc(12,53,0),
- ll,cc(12,54,0),ll,cc(12,55,0),
- ll,cc(13,55,0),ll,cc(14,55,0),
- ll,cc(15,55,0),ll,cc(15,52,0),
- ll,cc(15,53,0),ll,cc(15,54,0),
- ll,cc(16,53,0),ll,cc(17,54,0),
- ll,cc(18,55,0),ll,cc(19,55,0),ll.
- t:-
- cc(12,58,0),ll,cc(12,59,0),
- ll,cc(12,60,0),ll,cc(12,61,0),
- ll,cc(12,62,0),ll,cc(12,63,0),
- ll,cc(13,60,0),ll,cc(13,61,0),
- ll,cc(14,60,0),ll,cc(14,61,0),
- ll,cc(15,60,0),ll,cc(15,61,0),
- ll,cc(16,60,0),ll,cc(16,61,0),
- ll,cc(17,60,0),ll,cc(17,61,0),
- ll,cc(18,60,0),ll,cc(18,61,0),
- ll,cc(19,60,0),ll,cc(19,61,0),ll.
- d1:-box(0,0,79,0,1,24,24,1,79,0,79,24).
- d2:-box(2,3,77,2,4,22,22,4,77,2,77,22).
- d3:-box(4,7,75,4,8,20,20,8,75,4,75,20).
- d4:-box(6,9,73,6,10,18,18,10,73,6,73,18).
-
- draw:- r,o,c,k,e,x,p,e1,r1,t,
- cc(22,38,0),print('Copyright l987 Milt Popovich II'),
- box(0,9,70,0,10,23,23,9,70,0,70,23).
- drawboxes :- d1,d2,d3,d4.
- case(g1):- cls,drawboxes,rock_three,
- prtscr,sleep(50,R),start.
- case(g2):- cls,drawboxes,rock,prtscr,sleep(50,R),start.
- case(a):- cls,drawboxes,add,prtscr,sleep(50,R),start.
- case(c):- cls,drawboxes,rock_characteristics,prtscr,sleep(50,R),start.
- case(h):- cls,list,prtscr,sleep(50,Nu),start.
- case(d):- cls,drawboxes,dump,prtscr,sleep(50,Nu),start.
- case(e):- cls,exitsys.
- case(Unknown):-cc(17,25,0), print('Not a valid command try again '),
- cc(16,25,0),
- print('ENTER SELECTION HERE '),read(Command),case(Command).
-
- start:- cls,draw,sleep(25,R),prtscr,cls,drawboxes,cc(1,24,0),
- print('MAIN MENU FOR ROCK EXPERT SYSTEM'),cc(7,22,0),
- print('Select one of the following Commands: '),
- cc(8,22,0),print('YOU WANT TO ME TO GUESS KNOWING 3 ITEMS TYPE g1'),
- cc(9,22,0),print('YOU WANT ME TO GUESS KNOWING 7 ITEMS TYPE g2'),
- cc(10,22,0),print('YOU KNOW THE MINERAL CHARACTERISTICS TYPE c'),
- cc(11,22,0),print('YOU WANT TO ADD A ROCK MINERAL TYPE a'),
- cc(12,22,0),print('YOU WANT TO SEE VALID ITEMS TO TYPE TYPE h'),
- cc(13,22,0),print('YOU WANT TO SEE MY KNOWLEDGE BASE TYPE d'),
- cc(14,22,0),print('YOU WANT TO EXIT THE ROCK EXPERT TYPE e'),
- cc(16,25,0),
- print('ENTER SELECTION HERE '),
- read(Command),case(Command),prtscr.
- /* end of graphics rules */
-
- /* rules for expert system */
- append([],L,L):-!.
- append([X|L1],L2,[X|L3]):- append(L1,L2,L3).
- mymember(X,[X|_]):-!.
- mymember(X,[_|Y]):-mymember(X,Y).
- valid_minerals([molybdenite,graphite,sylvanite,bismuthinite,stibnite,
- stephanite,argentite,galena,jamesonite,bournonite,
- boulangerite,chalcocite,calaverite,copper,gold,silver,
- enargite,bornite,millerite,antimony,tetrahedrite,
- arsenic,chalcopyrite,pentlandite,pyrrhotite,platinum,
- limonite,goethite,nickleine,hematite,ilmenite,
- cobaltite,chromite,skutterudite,arsenopyrite,franklinite,
- magnetite,pyrolusite,rutile,marcasite,bixbyite,
- pyrite,biotite,siderite,wolframite,augite,hornblende,
- sphalerite,uraninite,cassiterite,calcite,garnet,
- serpentine,pyrargyrite,prousite,realgar,cinnabar,bauxite,
- cuprite,gypsum,rhodochrosite,fluorite,quartz,azurite,
- malachite,chrysocolla,talc,smithsonite,barite,olivine,
- beryl,orpiment,scheelite,muscovite,zircon,corundum,
- lazurite,anglesite,magnesite]).
-
- valid_luster([metallic,nonmetallic]).
-
- valid_color([gray,silver-white,white,black,yellow,red,tin-white,
- blue,bronze,brown,all_colors,green,vermillion,colorless,
- pink,violet,azure_blue,purple,orange,transparent]).
-
- valid_hardness([1-2,2-3,2-4,3-4,3-5,4-5,4-6,5-6,5-7,6-7,1-3,8-9,
- 2-3,7-8]).
- valid_streak([green,black,gray,brown,red,yellow,silver,white,
- colorless,blue]).
-
- valid_fracture([sheets,brittle,hackly,malleable,earthy,splintery,
- uneven,tough,conchoidal,sectile]).
-
- valid_gravity([4-5,1-2,7-8,6-7,4-5,5-6,9-10,8-9,15-19,10-11,
- 14-19,2-4,3-4,2-3,6-10]).
- valid_crystals([hexagonal,monoclinic,orthorhombic,isometric,
- tetragonal,amorphous,massive]).
- valid_cleavage([1-perfect,2-good,none,3-perfect,1-good,1-poor,
- 2-perfect,6-perfect,good,poor,4-perfect,2-poor,
- 6-poor]).
- mineral_search(G,[A1,B1,C1,D1,E1,F1,G1,H1]):-
- luster(G,A1),color(G,B1),
- hardness(G,C1),streak(G,D1),
- fracture(G,E1),specific_gravity(G,F1),
- crystals(G,G1),cleavage(G,H1).
-
- mineral_search_three(G,[A1,B1,C1]):- luster(G,A1),color(G,B1),
- hardness(G,C1).
-
-
- check_dump(X):- not(X=end).
- check_dump(X):- X = end,cls,curset(12,20,0),
- print('I m done dumping'),start.
- check_guess(G,Rockmineral):- not(G = end).
- check_guess(G,Rockmineral):- G = end,
- Rockmineral = 'I can not think of any more minerals',
- curset(16,20,0),
- clearline,curset(16,20,0),
- print(Rockmineral),curset(17,20,0),
- clearline,sleep(30,R),start.
-
- compare([A|B],[A1|B1],G,Rockmineral):-
- check_guess(G,Rockmineral),([A|B] = [A1|B1]),Rockmineral=G.
-
- unknown_mineral([W|V],Rockmineral):-
- mineral_search(Guess,[X|Z]),
- compare([W|V],[X|Z],Guess,Rockmineral).
-
- unknown_mineral_three([W|V],Rockmineral):-
- mineral_search_three(Guess,[X|Z]),
- compare([W|V],[X|Z],Guess,Rockmineral).
-
- choice(y):- curset(16,20,0),clearline,!,fail.
- choice(n):- start.
- choice(Unknown):-
- curset(17,20,0),
- print('Do you want another guess type y or n --> '),
- read(Answer),choice(Answer).
-
- /* check rules */
- check_mineral(M,L):-valid_minerals(Z),not(mymember(M,Z)),
- cc(7,20,0),clearline,cc(7,20,0),
- print('Enter the name of the mineral '),
- read(Mineral1),check_mineral(Mineral1,Mineral).
- check_mineral(M,L):- M=L.
- check_luster(M,L):- valid_luster(Z),not(mymember(M,Z)),
- curset(8,20,0),clearline,
- curset(8,20,0),print('Enter in the luster of your rock --> '),
- read(Luster),Luster=L,check_luster(L,L1).
- check_luster(M,L):- M=L.
- check_color(M,L):- valid_color(Z),not(mymember(M,Z)),
- curset(9,20,0),clearline,
- curset(9,20,0),print('Enter in the color of your rock --> '),
- read(Color),Color=L,check_color(L,L1).
- check_color(M,L):- M=L.
- check_hardness(M,L):- valid_hardness(Z),not(mymember(M,Z)),
- curset(10,20,0),clearline,
- curset(10,20,0),print('Enter in the hardness of your rock --> '),
- read(Hardness),Hardness=L,check_hardness(L,L1).
- check_hardness(M,L):- M=L.
- check_streak(M,L):-
- valid_streak(Z),not(mymember(M,Z)),curset(11,20,0),clearline,
- curset(11,20,0),print('Enter in the streak of your rock --> '),
- read(Streak),Streak=L,check_streak(L,L1).
- check_streak(M,L):- M=L.
- check_fracture(M,L):- valid_fracture(Z),not(mymember(M,Z)),
- curset(12,20,0),clearline,
- curset(12,20,0),print('Enter in the fracture of your rock --> '),
- read(Fracture),Fracture=L,check_fracture(L,L1).
- check_fracture(M,L):- M=L.
- check_gravity(M,L):- valid_gravity(Z),not(mymember(M,Z)),
- curset(13,20,0),clearline,
- curset(13,20,0),print('Enter in the specific_gravity of your rock -->'
- ),read(Specific_gravity),Specific_gravity=L,check_gravity(L,L1).
- check_gravity(M,L):-M=L.
- check_crystals(M,L):- valid_crystals(Z),not(mymember(M,Z)),
- curset(14,20,0),clearline,
- curset(14,20,0),print('Enter in the crystals of your rock --> '),
- read(Crystals),Crystals=L,check_crystals(L,L1).
- check_crystals(M,L):- M=L.
- check_cleavage(M,L):- valid_cleavage(Z),not(mymember(M,Z)),
- curset(15,20,0),clearline,
- curset(15,20,0),print('Enter in the cleavages of your rock --> '),
- read(Cleavage),Cleavage=L,check_cleavage(L,L1).
- check_cleavage(M,L):- M=L.
- /* end of check rules */
- /* the knowledge rules */
- rock:- curset(1,20,0),
- print('THE GUESS MENU FOR 7 CHARACTERISTICS'),
- curset(8,20,0),print('Enter in the Luster of your rock
- --> '),read(Luster1),check_luster(Luster1,Luster),curset(9,20,0),
- print('Enter in the color of your rock --> '),read(Color1),
- check_color(Color1,Color),curset(10,20,0),
- print('Enter in the hardness of your rock --> '),read(Hardness1),
- check_hardness(Hardness1,Hardness),curset(11,20,0),
- print('Enter in the streak if your rock --> '),read(Streak1),
- check_streak(Streak1,Streak),curset(12,20,0),
- print('Enter in the fracture of your rock --> '),read(Fracture1),
- check_fracture(Fracture1,Fracture),curset(13,20,0),
- print('Enter in the specific_gravity of your rock --> '),
- read(Specific_gravity1),
- check_gravity(Specific_gravity1,Specific_gravity),curset(14,20,0),
- print('Enter in the crystals of your rock --> '),read(Crystals1),
- check_crystals(Crystals1,Crystals),curset(15,20,0),
- print('Enter in the cleavage of your rock -->'),
- read(Cleavage1),check_cleavage(Cleavage1,Cleavage),
- unknown_mineral([Luster,Color,Hardness,Streak,Fracture,
- Specific_gravity,Crystals,Cleavage],Search),curset(16,20,0),
- print('The rock mineral is ',Search),curset(17,20,0),
- print('Do you want another guess type y or n --> '),read(Answer),
- choice(Answer).
-
- rock_three:-curset(1,20,0),
- print('THE GUESS MENU FOR 3 CHARACTERISTICS'),
- curset(8,20,0),
- print('Enter in the Luster of your rock --> '),
- read(Luster1),check_luster(Luster1,Luster),curset(9,20,0),
- print('Enter in the color of your rock --> '),read(Color1),
- check_color(Color1,Color),curset(10,20,0),
- print('Enter in the hardness of your rock --> '),read(Hardness1),
- check_hardness(Hardness1,Hardness),
- unknown_mineral_three([Luster,Color,Hardness],Search_three),
- curset(16,20,0),
- print('The rock mineral is ',Search_three),curset(17,20,0),
- print('Do you want another guess type y or n --> '),read(Answer),
- choice(Answer).
- add_to_the_mineral(X):- valid_minerals([H|T]),append([H|T],[X],Z),
- retract(valid_minerals(L)),asserta(valid_minerals(Z)).
- list:- curset(1,20,0),
- print('THE MENU FOR A LISTING VALID CHARACTERISTICS'),
- curset(2,1,0),valid_minerals(Z),
- print('We have the following minerals ',Z),
- print('****************************'),nl,
- valid_luster(A),print('We have the following luster :',A),
- print('****************************'),nl,
- valid_color(B),print('We have the following colors :',B),
- print('****************************'),nl,
- valid_hardness(C),print('We have the following hardness
- intervals :',C),print('**************************'),nl,
- valid_streak(D),print('We have the following streaks :',D),
- print('****************************'),nl,valid_fracture(E),
- print('We have the following fractures :',E),
- print('*****************************'),nl,valid_gravity(F),
- print('We have the following specific gravities :',F),
- print('*****************************'),nl,valid_crystals(G),
- print('We have the following crystals :',G),
- print('*****************************'),nl,valid_cleavage(H),
- print('We have the following cleavages :',H).
- add:- curset(1,20,0),print('THE MENU FOR ADDING MINERALS'),
- curset(8,20,0),
- print('Please enter the name of the mineral--> '),read(X),
- add_to_the_mineral(X),
- curset(9,20,0),
- print('Enter the luster of your mineral --> '),read(A),
- asserta(luster(X,A)),curset(10,20,0),
- print('Enter the color of ',X,' --> '),read(B),
- asserta(color(X,B)),curset(11,20,0),
- print('Enter the hardness interval of ',X,' --> '),read(C),
- asserta(hardness(X,C)),curset(12,20,0),
- print('Enter the streak of ',X,' --> '),read(D),
- asserta(streak(X,D)),curset(13,20,0),
- print('Enter the fracture of ',X,' --> '),read(E),
- asserta(fracture(X,E)),curset(14,20,0),
- print('Enter the specific_gravity interval of ',X,' --> '),
- read(F),
- asserta(specific_gravity(X,F)),curset(15,20,0),
- print('Enter the crystals of ',X,' --> '),read(G),
- asserta(crystals(X,G)),curset(16,20,0),
- print('Enter the cleavage of ',X,' --> '),read(H),
- asserta(cleavage(X,H)),curset(17,20,0),
- print('Enter the test elements of ',X,' with quotes-> '),
- read(I),asserta(test_elements(X,I)).
- dump :- curset(1,20,0),print('THE DUMP OF MINERALS'),
- curset(3,20,0),
- print('IF YOU WANT TO STOP THIS PUSH ESC KEY AND TYPE start'),
- luster(X,A),check_dump(X),
- curset(8,20,0),clearline,curset(8,20,0),
- print(X,' has a ',A,' luster '),
- color(X,B),curset(9,20,0),clearline,curset(9,20,0),
- print(X,' has the color of ',B),
- hardness(X,C),curset(10,20,0),clearline,curset(10,20,0),
- print(X,' is in the hardness interval ',C),
- streak(X,D),curset(11,20,0),clearline,curset(11,20,0),
- print(X,' has a streak color of ',D),
- fracture(X,E),curset(12,20,0),clearline,curset(12,20,0),
- print(X,' has a fracture of ',E),
- specific_gravity(X,F),curset(13,20,0),
- clearline,curset(13,20,0),
- print(X,' has a specific gravity of ',F),
- crystals(X,G),curset(14,20,0),clearline,curset(14,20,0),
- print(X,' has a crystal ',G,' structure '),
- cleavage(X,H),curset(15,20,0),clearline,curset(15,20,0),
- print(X,' has a cleavage of ',H),
- test_elements(X,I),curset(16,20,0),clearline,curset(16,20,0),
- print(X,' chemical elements are ',I),
- prtscr,sleep(10,Nu),fail.
-
- mineral(X):- curset(8,20,0),luster(X,A),
- print(X,' has a ',A,' luster '),
- color(X,B),curset(9,20,0),
- print(X,' has the color of ',B),
- hardness(X,C),curset(10,20,0),
- print(X,' is in the hardness interval ',C),
- streak(X,D),curset(11,20,0),
- print(X,' has a streak color of ',D),
- fracture(X,E),curset(12,20,0),
- print(X,' has a fracture of ',E),
- specific_gravity(X,F),curset(13,20,0),
- print(X,' has a specific gravity of ',F),
- crystals(X,G),curset(14,20,0),
- print(X,' has a crystal ',G,' structure '),
- cleavage(X,H),curset(15,20,0),
- print(X,' has a cleavage of ',H),
- test_elements(X,I),curset(16,20,0),
- print(X,' chemical elements are ',I).
-
- rock_characteristics:-cc(1,20,0),
- print('THE MENU FOR A MINERAL CHARACTERISTICS'),
- cc(7,20,0),
- print('Enter the name of the mineral '),
- read(Mineral1),check_mineral(Mineral1,Mineral),mineral(Mineral).